home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / cdrom / cd32goodies / make hd startup < prev    next >
Text File  |  1977-12-31  |  6KB  |  263 lines

  1. ;$VER: CD32 HD-Install 42.1 (21.11.94)
  2. ;Copyright © 1994 Elaborate Bytes, Oliver Kastl
  3.  
  4. (onerror
  5.     (if (exists "S:Startup-Sequence.std")
  6.         (
  7.         ( protect "S:Startup-Sequence.std" "-e +rwsd" )
  8.         (if (exists "S:Startup-Sequence")
  9.             (
  10.             ( protect "S:Startup-Sequence" "-e +rwsd" )
  11.             (delete "S:Startup-Sequence")
  12.             )
  13.         )
  14.         (rename "S:Startup-Sequence.std" "S:Startup-Sequence")
  15.         )
  16.     )
  17.     (makeassign "CD32Inst" (safe))
  18. )
  19.  
  20. (set #wbversion (getversion "libs:version.library"))
  21. (set #wbversion (/ #wbversion 65536) )
  22.  
  23. (set #Expansion 1)
  24.  
  25. (set @default-dest "")
  26.  
  27. (complete 0)
  28.  
  29.  
  30. (if (< #wbversion 39)
  31.     ((abort "\n\nAmigaDOS 3.0 or higher is required for the CD32-Emulator! "
  32.              "\n\nAn upgrade will be needed for your Amiga." )
  33. ))
  34.  
  35.  
  36. (message
  37.     "\nThis program will install or remove a special \"S:Startup-Sequence\" for the CD32-Emulator. "
  38.          "With the help of this, you may directly boot from a CD32-CD if you press a function key during boot. "
  39.          "\n\nIf you wish to install, the CacheCDFS MUST be already installed and running! "
  40.        "\n\nWARNING: This program MUST NOT be started from the CDFS Install Disk!"
  41.         )
  42.  
  43. (makeassign "CD32Inst" "" (safe))
  44.  
  45. (if (NOT (exists "CD32Inst:PutPrefs"))
  46.     (
  47.     (abort "\n\nCould not find the PutPrefs program!")
  48.     )
  49. )
  50.  
  51. (set #install
  52.     (askbool
  53.         (prompt "\n\nDo you wish to install or remove the special \"S:Startup-Sequence\" ?")
  54.         (help   "Choose if you wish to install, or if you wish to remove an installation.")
  55.         (default 1)
  56.         (choices "Install" "Remove")
  57.     )
  58. )
  59.  
  60. (if (NOT #install)
  61.     (
  62.     (if (exists "S:Startup-Sequence.std")
  63.         (
  64.         ( protect "S:Startup-Sequence.std" "-e +rwsd" )
  65.         (if (exists "S:Startup-Sequence")
  66.             (
  67.             ( protect "S:Startup-Sequence" "-e +rwsd" )
  68.             (delete "S:Startup-Sequence")
  69.             )
  70.         )
  71.         (rename "S:Startup-Sequence.std" "S:Startup-Sequence")
  72.         )
  73.     )
  74.     (if (exists "C:KeyCheck")
  75.         (
  76.         (user 2)
  77.         (delete "C:KeyCheck" 
  78.             (help "Select \"Proceed\", if you want C:KeyCheck to be deleted.")
  79.             (prompt "\n\nDelete C:KeyCheck ?")
  80.             (confirm)
  81.         )
  82.         )
  83.     )
  84.  
  85.     (makeassign "CD32Inst" (safe))
  86.     (exit)
  87.     )
  88. )
  89.  
  90. (set #CDDevice_NC "CD0" )
  91.  
  92. (set #CDDevice_NC
  93.     (askstring
  94.         (prompt "\n\nWhat is the name of the CD-ROM device?\n\n"
  95.         "(The trailing colon MUST NOT be present)" 
  96.         )
  97.         (default #CDDevice_NC )
  98.         (help "\n\nThis is the name under which AmigaDOS references the "
  99.                 "CD-Rom as.  While usually "
  100.                 #CDDevice_NC
  101.                 ", it can be any name you choose. "
  102.                 "\n\nThe trailing : (colon) MUST NOT be present." )
  103.     )
  104. )
  105.  
  106. (complete 30)
  107.  
  108. (working "\n\nLaunching the FindCD32 program to find "
  109.          "the Device and Unit of your CD-Rom..."
  110.          "\n\nNote that the CacheCDFS MUST be already installed and running!")
  111.  
  112. (if (NOT (exists "CD32Inst:FindCD32"))
  113.     (
  114.     (abort "\n\nCould not find the FindCD32 program!")
  115.     )
  116. )
  117.  
  118. (set #Product ( run (cat "CD32Inst:FindCD32 " #CDDevice_NC) ( safe ) ) )
  119.  
  120. (if ( NOT (= #Product 0) )
  121.     (
  122.     (abort "\nCould not find your CDROM hardware!"
  123.              "\n\nThe CacheCDFS MUST be already installed and running! "
  124.           "\n\nYour CD-Rom MUST be installed as " #CDDevice_NC "!")
  125.     )
  126. )
  127.  
  128. ( set #CDROM_Device (getenv "CDROM_Device" ))
  129.  
  130. (complete 50)
  131.  
  132. (set #FKey
  133.     (askchoice
  134.         (prompt "Select the funktion key which starts the CD32-Emulator during bootup")
  135.         (help "\n\nHere you must select the function key you wish to use for "
  136.               "booting into CD32-Emulation. If you press this key while you "
  137.               "boot, the CD32-Emulator will be started instead of your normal "
  138.               "\"S:Startup-Sequence\".")
  139.         (default 9)
  140.         (choices "F1" "F2" "F3" "F4" "F5" "F6" "F7" "F8" "F9" "F10")
  141.     )
  142. )
  143.  
  144. (set #FKey (+ #FKey 50))
  145.         
  146. (set #CD32_Name "NotPresent")
  147.  
  148. (if (exists "CD32Inst:CD32-Demo" )
  149.     (
  150.     (set #CD32_Name "CD32-Demo")
  151.     )
  152. )
  153.  
  154. (if (exists "CD32Inst:TandemCD32" )
  155.     (
  156.     (set #CD32_Name "TandemCD32")
  157.     )
  158. )
  159.  
  160. (if (exists "CD32Inst:CD1200_CD32" )
  161.     (
  162.     (set #CD32_Name "CD1200_CD32")
  163.     )
  164. )
  165.  
  166. (if (exists "CD32Inst:CD32" )
  167.     (
  168.     (set #CD32_Name "CD32")
  169.     )
  170. )
  171.  
  172. (if (= #CD32_Name "NotPresent")
  173.     (
  174.     (abort "\n\nCould not find a CD32-Emulator!")
  175.     )
  176. )
  177.  
  178. (set #CD32_Path (getassign "CD32Inst"))
  179.  
  180. (CopyLib
  181.     (source "CD32Inst:KeyCheck")
  182.     (dest "C:")
  183. )
  184.  
  185.  
  186. (if (exists (tackon "DEVS:" #CDROM_Device) )
  187.     ((set #Expansion 0))
  188. )
  189.  
  190. (if #Expansion
  191.     (
  192.     (set #Expansion ( NOT (askbool
  193.         (prompt "\n\nIs your CD-Rom controller an Autoboot controller ?")
  194.         (default 0 )
  195.         (help "\n\nChoose \"YES\" if your controller is an autoboot controller "
  196.                 "and \"NO\" if not!")
  197.  
  198.         ))
  199.     ))
  200. )
  201.  
  202. (if #Expansion
  203.     (
  204.     (set #BindDrivers "    C:BindDrivers\n")
  205.     )
  206. )
  207.  
  208. (if (NOT #Expansion)
  209.     (
  210.     (set #BindDrivers "")
  211.     )
  212. )
  213.  
  214. (complete 80)
  215.  
  216. ( protect "S:Startup-Sequence" "-e +rwsd" )
  217.  
  218. (if (NOT (exists "S:Startup-Sequence.std" ))
  219.     (
  220.     (rename "S:Startup-Sequence" "S:Startup-Sequence.std")
  221.     )
  222. )
  223.  
  224. (textfile
  225.     (dest "S:Startup-Sequence" )
  226.     (append ";********************************************************************\n"
  227.               ";*  CD32-Emulator startup-sequence © 1994 Elaborate Bytes, O. Kastl *\n"
  228.               ";********************************************************************\n")
  229.     (append "\n")
  230.     (append "C:Assign T: RAM:\n")
  231.     (append "C:Assign ENV: RAM:\n")
  232.     (append "C:KeyCheck " #FKey "\n")
  233.     (append "if warn\n")
  234.     (append #BindDrivers)
  235.     (append "    ")
  236.     (append (tackon #CD32_Path #CD32_Name) "\n")
  237.     (append "endif\n\n")
  238.     (append "C:Execute S:Startup-Sequence.std\n")
  239.     (append "EndCLI >NIL:\n")
  240. )    
  241.  
  242. ( protect "S:Startup-Sequence" "-e +rwsd" )
  243.  
  244. ( if (NOT @pretend )
  245.     ((if ( run "CD32Inst:PutPrefs NonLace" )
  246.     (
  247.     (abort "\n\nPutPrefs program failed!")
  248.     ))
  249. ))
  250.  
  251. (complete 90)
  252.  
  253. (tooltype
  254.     (dest (tackon "CD32Inst:" #CD32_Name) )
  255.     (settooltype "DOSDEV" #CDDevice_NC )
  256.     (noposition)
  257. )
  258.  
  259. (complete 100)
  260.  
  261. (makeassign "CD32Inst" (safe))
  262.  
  263.